There have been various proposals for detecting residual amounts of liquid stored in liquid cartridges. According to one of such techniques, a residual amount of liquid is detected by using a photosensor (photointerrupter) including a light-emitting element and a light-receiving element.
A technique to detect an amount of ink in an ink cartridge loaded in a cartridge loading portion of an inkjet printer is also known. Such an ink cartridge has a main body serving as an ink chamber, an arm movably provided within the ink chamber, a float and a shielding plate. The float is connected to one end of the arm so as to move in a vertical direction in accordance with an amount of ink in the ink chamber. The shielding plate is connected to another end of the arm so as to move in conjunction with vertical movement of the float.
The cartridge loading portion is provided with a sensor including a light-emitting element and a light-receiving element. The light-emitting element emits light toward the loaded ink cartridge, and the light-receiving element receives the light that was transmitted through the ink cartridge. When more than a predetermined amount of ink is left in the ink chamber, the shielding plate is at such a position that the shielding plate shuts off the light from the light-emitting element. Therefore, the light-receiving element does not receive the light from the light-emitting element through the ink cartridge. On the other hand, when the ink decreases below the predetermined amount, the shielding plates moves in accordance with the movement of the float so that the shielding plate no longer shuts off the light. As a result, the light emitted from the light-emitting element passes through the ink cartridge and is received at the light-receiving element. With this configuration, whether the predetermined amount of ink is left within the ink chamber can be detected based on changes in an amount of light received at the light-receiving element.